
package com.xin.di.uav.applet.mapper;

import com.xin.di.uav.common.response.IdAndNameResp;
import com.xin.di.uav.operate.po.PermissionPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface PermissionMapper {






    @Select({"<script>",
            "SELECT id, parent_id, perm_name\n" +
                    "FROM sys_permission\n" +
                    "ORDER BY sort DESC",
            "</script>"})
    List<PermissionPO> selectList();


    @Select({"<script>",
            "select  id, parent_id, perm_name, perm_key, perm_type, path, component, visible, sort, icon,\n" +
                    "                            create_time from sys_permission where  id in \n ",
            "       <foreach item=\"id\" collection=\"ids\" open=\"(\" separator=\",\" close=\")\">\n" +
                    "            #{id}\n" +
                    "        </foreach>" +
                    "</script>"})
    List<PermissionPO> selByIds(List<String> ids);
}
